export const useUserInfoStore = defineStore(
  'userInfo',
  () => {
    const userInfo = ref<UserInfo | null>(null)

    const setUserInfo = (newVal: UserInfo | null) => {
      userInfo.value = newVal
    }

    const $reset = () => setUserInfo(null)

    return { userInfo, setUserInfo, $reset }
  },
  {
    persist: { enabled: true },
  },
)
